﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLK.Database.DALs;

namespace QLK.Database.BLLs
{
    public class PriceBLL
    {
        private PriceDAL dal;

        public PriceBLL()
        {
            dal = new PriceDAL();
        }

        public List<Price> PriceGetAll()
        {
            return dal.PriceGetAll();
        }

        public Price PriceGetByID(int priceID)
        {
            if (priceID > 0)
                return dal.PriceGetByID(priceID);
            return null;
        }

        public bool PriceInsert(Price price)
        {
            return dal.PriceInsert(price);
        }

        public bool PriceUpdate(Price price)
        {
            return dal.PriceUpdate(price);
        }

        public bool PriceDeleteByID(int priceID)
        {
            return dal.PriceDeleteByID(priceID);
        }

        public bool PriceCheckPriceIsActive(int ProductID)
        {
            return dal.PriceCheckPriceIsActive(ProductID);
        }
    }
}
